﻿@inherits BaseComponent

<div style="margin:0 10px;">
    @if (Menu.Page != null && Menu.Page.NoBackground)
    {
        <DynamicComponent @ref="dc" Type="Menu.ComType" Parameters="Menu.ComParameters" />
    }
    else
    {
        <div class="kui-background">
            <DynamicComponent @ref="dc" Type="Menu.ComType" Parameters="Menu.ComParameters" />
        </div>
    }
</div>

@code {
    private DynamicComponent dc;

    [Parameter] public Known.MenuItem Menu { get; set; }

    public override void StateChanged()
    {
        (dc?.Instance as BaseComponent)?.StateChanged();
    }
}